package com.springmvc;

import com.springdingyiaop.MyLog;
//import com.zidongpeizhi2.My1612cService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;

/**
 * 作者: LCG
 * 日期: 2019/9/19 10:07
 * 描述:
 */

@Controller
public class TestController02 {

    @Autowired(required = false)
    Map<String,Object> map;

  @RequestMapping("test003")
  @ResponseBody
  public String test01(HttpServletRequest request){

      Map<String,Object> map=new HashMap<String,Object>();
      map.put("zhangsan","YYYYY");

      request.setAttribute("AA",map);

      System.out.println("=============");



      return "order";
  }


    @RequestMapping("test004")
    @ResponseBody
    @MyLog(isOpen = false,info="hello aop log !")
    public String test02(){

        System.out.println("=============");

        return "order";
    }


    /**
     * SpringBoot自动装配的测试
     */
   /* @Autowired
    private My1612cService my1612cService;

    @RequestMapping("test1000")
    @ResponseBody
    public String test1000(){
        return my1612cService.test();
    }*/

}
